home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Alles Voor Internet / Tout Pour Internet
/
alles voor internet.iso
/
MacInternet™
/
Telnet
/
NCSA
/
tn3270 2.4d7 source
/
tn3270
/
globals.c
< prev
next >
Wrap
Text File
|
1992-04-17
|
8KB
|
198 lines
/*
* tn3270 for the Macintosh Source Code
* Brown University Computing and Information Services
* Version 2.4d7 April, 1992
* Copyright (c) 1988, 1989, 1990, 1991, 1992 by Brown University and by
* Peter John DiCamillo.
*
* Permission is granted to any individual or institution to use, copy,
* or redistribute the binary version of this software and its
* documentation provided this notice and the copyright notices are
* retained. Permission is granted to any individual or non-profit
* institution to use, copy, modify, or redistribute the source files
* of this software provided this notice and the copyright notices are
* retained. This software may not be distributed for profit, either
* in original form or in derivative works, nor can the source be
* distributed to other than an individual or a non-profit institution.
* Any individual or group interested in seeing and/or using these
* source files but who are prevented from doing so by the above
* constraints should contact Don Wolfe, Assistant Vice-President for
* Computer Systems at Brown University, (401) 863-7250, for possible
* software licensing of the source developed at Brown.
*
* Brown University and Peter John DiCamillo make no representations
* about the suitability of this software for any purpose.
*
* BROWN UNIVERSITY AND PETER JOHN DICAMILLO GIVE NO WARRANTY, EITHER
* EXPRESS OR IMPLIED, FOR THE PROGRAM AND/OR DOCUMENTATION PROVIDED,
* INCLUDING, WITHOUT LIMITATION, WARRANTY OF MERCHANTABILITY AND
* WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#include "maclib.h"
#include "termdef.h"
char done; /* flag for mainline to return */
cnr *cplist[MAXSESSIONS]; /* pointers to connections records */
cnr *menu_cplist[MAXSESSIONS+1]; /* pointers corresponding to conn. menu */
Rect screenRect;
Rect dragRect;
MenuHandle myMenus[NMENUS];
MenuHandle kybdMenu;
MenuHandle nlMenu;
MenuHandle configMenu;
EventRecord myEvent;
Cursor *normcurs; /* default Macintosh cursor (arrow) */
char dfltcurs; /* flag to keep track of cursor */
RgnHandle temprgn; /* work region */
scrapline * scrapstart;
short scrapalloc;
short scrapsize;
short scrapwidth;
char scrap_stdfont;
char scrap_repnull;
Handle scrap_nlhandle;
unsigned char scrap_nltab[256];
char specmenu = 0; /* "special" menu inserted */
char ScrDmpSav; /* saved ScrDmpEnb byte */
char sw_bgrnd; /* running in switcher background */
char sw_upd; /* update occurred in background */
char sw_beep; /* beep occurred in background */
Point mousehit; /* last hit in dialog box */
char colormac; /* true if we have color QuickDraw */
char newroms; /* Mac has 128K ROMs or newer */
unsigned char syslevel; /* level of system software (1st digit) */
char newkybd; /* new (ADB) keyboard in use */
char extkybd; /* extended ADB keyboard in use */
char mf_bgrnd; /* in background under MultiFinder */
char ftpcopen; /* FTP control connection open */
char ftpdopen; /* FTP data connection open */
char ftplopen; /* FTP list connection open */
THPrint hPrint; /* print record handle */
char prtinit; /* flag for printing intialization */
short rowmax9; /* maximum no. of rows for 9-point font */
short colmax9; /* maximum no. of columns for 9-pt. font */
short rowmax12; /* maximum no. of rows for 12-point font */
short colmax12; /* maximum no. of columns for 12-pt. font */
Handle xtabh; /* handle to EBCDIC to Mac ASCII xtab */
Handle alaxtabh; /* handle to ALA diacritic table */
char sndactive; /* true while sound is being played */
SndChannelPtr scp; /* pointer for async sound channel */
char smgr_sppc; /* true if session manager registered ok */
short smgrrefnum; /* session manager SPPC refnum */
char gestaltavail; /* Gestalt is available */
char ppcavail; /* PPC is available */
unsigned long ppcflags; /* PPC flags from Gestalt */
char smgrppc; /* true if session mananger opened a port */
short smgrpref; /* port refnum for session manager */
queueinfo paramqueue; /* PPC param block queue */
queueinfo clientqueue; /* PPC client record queue */
queueinfo dataqueue; /* PPC data block queue */
char haveserial; /* serial driver present */
char havetcp; /* TCP/IP driver present */
char havesa; /* standalone driver present */
Handle default_kybdhandle; /* handle to default keyboard mapping */
cnr *pictcp; /* pointer for saving graphics */
unsigned char dbgmsg[256]; /* buffer for debug messages */
char pasteok; /* paste is possible now */
char usemyscrap; /* do paste from private scrap */
char writedebug; /* enable write tracing */
/* config. connection settings */
/* (nearly all have effects before they could
be changed during a session) */
unsigned char cf_hostname[256]; /* host name */
unsigned char cf_wtitle[256]; /* window name */
char cf_dblevel; /* debug level */
char cf_setsflg; /* connection mode */
unsigned char cf_timeout; /* seconds between retransmits */
unsigned char cf_retries; /* number of retries */
short cf_dfltptsize; /* default screen point size */
short cf_altptsize; /* alternate screen point size */
short cf_altrows; /* rows for alternate screen */
short cf_altcols; /* columns for alternate screen */
short cf_custrows; /* custom row size */
short cf_custcols; /* custom column count */
char cf_windmax; /* always use maximum window size */
char cf_savewpos; /* save window position in file */
char cf_ext3270; /* extended data stream support */
char cf_nographics; /* don't allocate graphics bitmap */
char cf_nocolor; /* bitmaps only 1 bit deep */
/* configuration settings from API open */
OpenRequest apiopenreq;
unsigned char apihostname[256];
unsigned char apiwindowname[256];
short apiopenrefnum; /* SPPC client refnum for open */
unsigned long apiopenmsgid; /* SPPC/PPC message id of open request */
char apiopenkind; /* 0 = PPC, 1 = SPPC */
unsigned long apiopensref; /* PPC session refnum for open */
/* work variables for new settings */
settings_list ns;
unsigned char nshostname[256];
unsigned char nswtitle[256];
unsigned char nskybdname[256];
unsigned char nsnlname[256];
unsigned char nssndname[256];
/* default settings */
settings_list ds = {
{0x00, 0x40, /* attributes */
0x80, 0x20,
0x30, 0x10,
0x80},
0, /* dblevel */
2, /* setsflg (set by ioinit) */
1, /* timeout */
15, /* retries */
1, /* insreset */
1, /* impnull */
1, /* digitpfk */
23, /* mousepf */
0, /* basecolor */
1, /* exactcolor */
DFLTWHITE, /* usrwhite */
DFLTYELLOW, /* usryellow */
DFLTPINK, /* usrpink */
DFLTTURQUOISE, /* usrturquoise */
DFLTGREEN, /* usrgreen */
DFLTRED, /* usrred */
DFLTBLUE, /* usrblue */
DFLTBLACK, /* usrblack */
DFLTBACK, /* usrback */
DFLTSTAT, /* usrstat */
12, /* dfltptsize */
12, /* altptsize */
24, /* altrows */
80, /* altcols */
24, /* custrows */
80, /* custcols */
0, /* windpth */
0, /* windptv */
0, /* invertbw */
1, /* stat_time */
0, /* curpos */
0, /* blockcurs */
1, /* ext3270 */
1, /* std_brack */
1, /* windmax */
1, /* repnull */
1, /* savewpos */
1, /* autoconn */
'ttxt', /* text_creator */
0, /* simps */
0, /* keepwindow */
1, /* nographics */
0 /* nocolor */
};
unsigned char dshostname[256]; /* set to default name for default driver */
unsigned char dswtitle[] = "";
unsigned char dskybdname[] = "default";
unsigned char dsnlname[256];
unsigned char dssndname[] = "System Alert Sound";